package com.fg.room.pojo.DTO;

import com.fg.common.valid.AddStrategy;
import com.fg.common.valid.UpdateStrategy;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created by kny on 2021/4/26 16:51
 */
@Data
@ApiModel(description = "故障类型Dto对象")
public class FaultTypeDto {


    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空",groups = {UpdateStrategy.class})
    private String id;

    @ApiModelProperty(value = "类型名称")
    @NotBlank(message = "故障类型不能为空",groups = {AddStrategy.class, UpdateStrategy.class})
    private String name;

    @ApiModelProperty(value = "排序")
    @NotNull(message = "故障类型排序字段不能为空",groups = {AddStrategy.class, UpdateStrategy.class})
    private Integer orderBy;
}
